﻿<UserControl x:Class="LEShortcut.Pages.Setting"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:si="http://schemas.microsoft.com/expression/2010/interactions"
             mc:Ignorable="d"
             d:DesignHeight="520" d:DesignWidth="720">
    <Grid Style="{StaticResource ContentRoot}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="18*" />
            <ColumnDefinition Width="2*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="0" />
            <RowDefinition Height="3*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="3*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="9*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="3*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="3*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid Row="1" Column="1">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Label Content="{DynamicResource LanguageLabel}" />
            <ComboBox Grid.Row="1" ItemsSource="{Binding Context.LanguageDictionary}" DisplayMemberPath="Key"
                      SelectedValuePath="Value">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="SelectionChanged">
                        <si:CallMethodAction MethodName="LanSelectionChanged" TargetObject="{Binding}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </ComboBox>
        </Grid>
        <Grid Row="9" Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Button Grid.Column="1" Content="{DynamicResource Save}" Command="{Binding SaveConfigCommand}"
                    CommandParameter="{Binding Context.Config}" />
        </Grid>
    </Grid>
</UserControl>